# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.shortcuts import render

# Create your views here.
def index(reuqest):
    #由于settings和ip_address都加入到了上下文渲染器，所以这里不用在视图函数index
    #中传递settings和ip_address变量
    return render(reuqest, 'blog/index.html')
 
 
def columns(request):
    #由于settings和ip_address都加入到了上下文渲染器，所以这里不用在视图函数columns
    #中传递settings和ip_address变量
    #不加入渲染器的写法：
    #return render(request, 'blog/columns.html',{'settings': original_settings,'ip_address': request.META['REMOTE_ADDR']})
    return render(request, 'blog/columns.html')